package cn.yunhe.biz;

import cn.yunhe.bean.Hotel;
import cn.yunhe.bean.RoomType;
import cn.yunhe.dao.RoomTypeMapper;
import cn.yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class RoomTypeService {
     SqlSession session=SqlSessionFactoryUtil.getSqlSession();
     RoomTypeMapper roomTypeMapper=  session.getMapper(RoomTypeMapper.class);
     public int insertroom(RoomType roomType){
      int flag = roomTypeMapper.insertIfo(roomType);
      session.commit();
      return flag;
  }
     public Hotel getAllIfo(int id){
     return roomTypeMapper.getAllById(id);
  }
}
